<%@page import="com.jiang.vo.Member"%>
<%@page import="com.jiang.service.impl.MemberServiceImpl"%>
<%@page import="com.jiang.factory.ServiceFactory"%>
<%@page import="com.jiang.service.IMemberService"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>编辑信息功能</title>
		<link rel="stylesheet" type="text/css" href="css/basic.css" />
		<link rel="stylesheet" type="text/css" href="css/input.css" />
		<link rel="stylesheet" type="text/css" href="css/table.css" />
		<link rel="stylesheet" type="text/css" href="css/btn.css" />
		<script type="text/javascript" src="js/WdatePicker.js"></script>
		<script type="text/javascript" src="js/validateUtils.js"></script>
	</head>

	<body>

		<%
		
			IMemberService memberService = ServiceFactory.getInstance(MemberServiceImpl.class);
			String mid = request.getParameter("mid");
			Member m = memberService.findMemberById(mid);
			
			if(m != null) {
		
		 %>
		 		

		<form action="memberedit_do.jsp"  method="post">
			<table id="mytable" cellpadding="5px" cellspacing="0px" width="100%" border="1px solid #000000">
				<tr>
					<th colspan="3" align="left">编辑用户<%=m.getMid() %><input type="hidden" name="mid"  value="<%=m.getMid()%>"></th>
					
				</tr>
					
				<tr>
					<td>真实姓名:</td>
					<td><input type="text" name="name" id="name" value="<%=m.getName() %>" class="init">&nbsp;&nbsp;&nbsp;<span id="name_msg"></span></td>
					<td>请填写要增加的用户姓名</td>
				</tr>
				<tr>
					<td>性别:</td>
					<td>
						<%
								String sex = m.getSex();
						 %>
							<input type="radio" name="sex" id="sex" value="男"  <%=sex.equals("男")?"checked":"" %> >男&nbsp;&nbsp;&nbsp;
							<input type="radio" name="sex" id="sex" value="女"  <%=sex.equals("女")?"checked":"" %> >女&nbsp;&nbsp;&nbsp;<span id="sex_msg"></span></td>
					<td>请选择您的性别</td>
				</tr>
				<tr>
					<td>学历:</td>
					<td>
						<%
								String edu = m.getEdu();
						 %>
						<select name="edu" id="edu">
							<option value="小学" <%=edu.equals("小学")?"selected":"" %>>小学</option>
							<option value="初中" <%=edu.equals("初中")?"selected":"" %>>初中</option>
							<option value="高中" <%=edu.equals("高中")?"selected":"" %>>高中</option>
							<option value="大专" <%=edu.equals("大专")?"selected":"" %>>大专</option>
							<option value="本科" <%=edu.equals("本科")?"selected":"" %>>本科</option>
							<option value="硕士" <%=edu.equals("硕士")?"selected":"" %>>硕士</option>
							<option value="博士" <%=edu.equals("博士")?"selected":"" %>>博士</option>
							<option value="博士后" <%=edu.equals("博士后")?"selected":"" %>>博士后</option>
						</select>
						&nbsp;&nbsp;&nbsp;<span id="edu_msg"></span>
					</td>
					<td>请选择您的学历</td>
				</tr>
				<tr>
					<td>生日:</td>
					<td><input type="text" name="birth" id="birth" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})"  style="width: 250px;" value="<%=m.getBirthday()%>"><span id="birth_msg"></span></td>
					<td>请选择您的生日</td>
				</tr>
				<tr>
					<td>个人收入:</td>
					<td><input type="text" name="salary" id="salary" class="init" value="<%=m.getSalary()%>">&nbsp;&nbsp;&nbsp;<span id="salary_msg"></span></td>
					<td>请填写工资</td>
				</tr>
				<tr>
					<td colspan="3">个人简介:</td>
				</tr>
				<tr>
					<td colspan="3">
						<textarea id="note" name="note" cols="50" rows="10" ><%=m.getNote() %></textarea>
					</td>
				</tr>
				<tr>
					<td colspan="3">
						<input type="submit" value="增加" id="btn_add"  />&nbsp;&nbsp;<input type="reset" id="btn_reset" />
					</td>
				</tr>
			</table>

		</form>
		<%
			}
		 %>
	</body>

</html>